Skip to content

fix: detect jsonc and json5 mime types#414

Open
juliuss007 wants to merge 1 commit into
CortexLM:mainfrom
juliuss007:codex/fix-json-superset-mime-53032
Open

fix: detect jsonc and json5 mime types#414
juliuss007 wants to merge 1 commit into
CortexLM:mainfrom
juliuss007:codex/fix-json-superset-mime-53032

Conversation

@juliuss007
Copy link
Copy Markdown

Summary

  • classify .jsonc and .json5 file attachments as JSON-family text instead of generic binary data
  • add regression coverage for both JSON superset extensions

Fixes PlatformNetwork/bounty-challenge#53032

Verification

  • rustc +1.91.1 --test src/cortex-cli/src/run_cmd/mime.rs -o /tmp/cortex_mime_test_53032 && /tmp/cortex_mime_test_53032
  • cargo +1.91.1 check -p cortex-cli --lib
  • git diff --check HEAD^ HEAD
  • cargo +1.91.1 fmt --package cortex-cli --check

Bounty claim: PlatformNetwork/bounty-challenge#53032

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] [v0.0.7] \cortex run --file *.jsonc\ and \*.json5\ fall back to octet-stream

1 participant